#include "stdio.h"
int main()
{int n;
n=1;
while(n<=20)
{
	printf("%d->",n);
	n=n*3;
}
printf("%d\n",n);
return 0;
}